#include "ClassDemo.h"

ClassDemoA::ClassDemoA() {
	std::cout << "I'm created!-" << func() << std::endl;
}

ClassDemoA::~ClassDemoA() {
	std::cout << "Bye!" << func() << std::endl;
}

void ClassDemoA::Say() {
	std::cout << "Hi, I'm " << func() << std::endl;
}

std::string ClassDemoA::func() {
	return "ClassDemoA";
}

ClassDemoB::ClassDemoB() {
	std::cout << "I'm created!-" << func() << std::endl;
}

ClassDemoB::ClassDemoB(const std::string& para) {
	std::cout << "I'm created!-" << func() << " " << para << std::endl;
}

ClassDemoB::~ClassDemoB() {
	std::cout << "Bye!" << func() << std::endl;
}

void ClassDemoB::Say() {
	std::cout << "Hi, I'm " << func() << std::endl;
}

std::string ClassDemoB::func() {
	return "ClassDemoB";
}